<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery.js"></script>
<script type="text/javascript">
	$(function() {
		$.ajax({
			url : "${pageContext.request.contextPath}/emp/getTblMenu.action",
			type : "POST",
			dataType : "json",
			data : {"uuid" : '${sessionScope.emp.uuid }'},
			success : function(result, state, resp) {
						var yiji = "";
						for (var i = 0; i < result.length; i++) {
							var erji = '<ul>';
							for (var j = 0; j < result[i].menus.length; j++) {
								erji += '<li><a href="${pageContext.request.contextPath}/'+result[i].menus[j].url+'">'
										+ result[i].menus[j].name + '</a></li>';
							}
							erji += '</ul>';
							yiji += '<li class="has_sub"><a href="#"><i class="icon-list-alt"></i>'
									+ result[i].name
									+ '<span class="pull-right"><i class="icon-chevron-right"></i></span></a>'
									+ erji + '</li>';
						}
						$("#nav").html($("#nav").html() + yiji);
						$("#sc").attr("src","${pageContext.request.contextPath }/js/custom.js");
			}
		});
	})
</script>
<script id="sc"></script>
<div class="sidebar">
	<div class="sidebar-dropdown">
		<a href="#">导航</a>
	</div>

	<!--- Sidebar navigation -->
	<!-- If the main navigation has sub navigation, then add the class "has_sub" to "li" of main navigation. -->
	<ul id="nav" style="">
		<!-- Main menu with font awesome icon -->
		<li><a href="index.html" class="open"><i class="icon-home"></i>
				系统菜单</a></li>
		<%-- <c:forEach items="${menuList}" var="menu">
			<li class="has_sub"><a href="#"><i class="icon-list-alt"></i>
					${menu.name } <span class="pull-right"><i class="icon-chevron-right"></i></span></a>
				<ul>
				<c:forEach items="${menu.menus}" var="m">
					<li><a href="widgets1.html">${m.name }</a></li>
				</c:forEach>
				</ul>
			</li>
        </c:forEach> --%>
	</ul>
</div>